<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/13
 * Time: 10:32
 */

require '../tools/DbTools.php';

$username = $_POST['username'];
$phone = $_POST['phone'];
$code = $_POST['code'];

DbTools::InitDb();
//$sql = "INSERT INTO accountinfo(AccountCode,AccountPhone,RealName,OpenTime) VALUES (420107199602034199,13859003397,'诸葛亮',NOW())";
$sql = "INSERT INTO accountinfo(AccountCode,AccountPhone,RealName,OpenTime) VALUES ($code,$phone,'$username',now())";

$resutl = DbTools::noSelect($sql);
if($resutl['status']){
    echo '注册成功';
    echo '<a href="administrator.php">返回</a>';
}else{
    echo '注册失败： '.$resutl['message'];
    echo '<a href="administrator.php">返回</a>';
}

